package com.demo;

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.table.api.EnvironmentSettings;
import org.apache.flink.table.api.Table;
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Test {

  public static void main(String[] args) throws Exception {
      String date = "2020-07-23T16:00:00.000Z";
      date = date.replace("Z", " UTC");
      SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
      SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd");
      Date d = format.parse(date);
     System.out.println(format2.format(d));

  }
}
